package com.jysz.certificate.persistence.model.system;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.jysz.webcore.ssh.entity.AbstractBaseEntity;

@Entity
@Table(name = "sys_brand_")
@org.hibernate.annotations.Entity
public class Brand extends AbstractBaseEntity<Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name ;//简称
	private String fullName;//全称 
	private Integer theDefault;//默认主机厂 0：是 1：否
	private Set<Shop> shops;
	
	
	@Column(name = "_theDefault",columnDefinition="int(11)")
	public Integer getTheDefault() {
		return theDefault;
	}
	public void setTheDefault(Integer theDefault) {
		this.theDefault = theDefault;
	}
	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "rs_sys_brand__sys_shop_", joinColumns = @JoinColumn(name = "_brand_id"), inverseJoinColumns = @JoinColumn(name = "_shop_id"))	
	public Set<Shop> getShops() {
		return shops;
	}
	public void setShops(Set<Shop> shops) {
		this.shops = shops;
	}
	@Column(name = "_name", nullable = false, unique = true,columnDefinition="varchar(100)")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "_full_name",columnDefinition="varchar(100)")
	public String getFullName() {
		return fullName;
	}
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}
	/** property column names begin**/
	public static final String COLUMN_NAME = "name";
/** property column names end**/


}
